﻿using Biotech.Utils;
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Enumeration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project.B12.Model.Models
{
    /// <summary>
    /// 
    /// </summary>
    public class MicroplateConf
    {
        private static string GetCurrentProjectPath => System.AppDomain.CurrentDomain.BaseDirectory;//获取具体路径
        public string Microplate_ConfigPath;
        public string fileSName;
        public MicroplateConf(string _plateStyle) 
        {
            fileSName = _plateStyle;
            Microplate_ConfigPath = Path.Combine(GetCurrentProjectPath, "conf", _plateStyle);
        }
    
        private float x;
        public float X
        {
            get { return x; }
            set
            {
                x = value;
                iniUtil.INIWrite("motor", "X", value.ToString(), Microplate_ConfigPath);
            }
        }

        private float y;
        public float Y
        {
            get { return y; }
            set
            {
                y = value;
                iniUtil.INIWrite("motor", "Y", value.ToString(), Microplate_ConfigPath);
            }
        }
        private float r;
        public float R
        {
            get { return r; }
            set
            {
                r = value;
                iniUtil.INIWrite("motor", "R", value.ToString(), Microplate_ConfigPath);
            }
        }

        private float u;
        public float U
        {
            get { return u; }
            set
            {
                u = value;
                iniUtil.INIWrite("motor", "U", value.ToString(), Microplate_ConfigPath);
            }
        }
        public string name { get; set; }
        public int holeX1 { get; set; }
        public int holeX2 { get; set; }
        public int holeX3 { get; set; }
        public int holeX4 { get; set; }
        public int holeX5 { get; set; }
        public int holeX6 { get; set; }
        public int holeX7 { get; set; }
        public int holeX8 { get; set; }
        public int holeX9 { get; set; }
        public int holeX10 { get; set; }
        public int holeX11{ get; set; }
        public int holeX12{ get; set; }
        public int holeX13{ get; set; }
        public int holeX14{ get; set; }
        public int holeX15 { get; set; }
        public int holeX16 { get; set; }
        public int holeY1 { get; set; }
        public int holeY2 { get; set; }
        public int holeY3 { get; set; }
        public int holeY4 { get; set; }
        public int holeY5 { get; set; }
        public int holeY6 { get; set; }
        public int holeY7 { get; set; }
        public int holeY8 { get; set; }
        public int holeY9 { get; set; }
        public int holeY10 { get; set; }
        public int holeY11 { get; set; }
        public int holeY12 { get; set; }
        public int holeY13 { get; set; }
        public int holeY14 { get; set; }
        public int holeY15 { get; set; }
        public int holeY16 { get; set; }

        public int dx { get; set; }
        public int dy { get; set; }
        public int width { get; set; }
        public int height { get; set; }



        public int Square { get; set; }
        public int Fill { get; set; }
        public int Rr { get; set; }
        public int grayValueCo { get; set; }
        public int PixelCo { get; set; }
        public float CVCo { get; set; }


    }
}
